package com.hl.service;

import com.hl.mapper.QuestionMapper;
import com.hl.pojo.Question;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@Service
public class QuestionServiceImpl implements QuestionService{
    @Autowired
    private QuestionMapper questionMapper;

    @Override
    public Integer add(Question question) {
        return questionMapper.add(question);
    }

    @Override
    public Integer update(Question question) {
        return questionMapper.update(question);
    }

    @Override
    public Integer delete(Integer id) {
        return questionMapper.delete(id);
    }

    @Override
    public Question findById(Integer id) {
        return questionMapper.findById(id);
    }

    @Override
    public List<Question> findAll() {
        return questionMapper.findAll();
    }
    @Override
    public List<Question> findAll1() {
        return questionMapper.findAll1();
    }
    @Override
    public List<Question> findAll4() {
        return questionMapper.findAll4();
    }

    @Override
    public List<Question> findkecheng(Integer id){
        return questionMapper.findkecheng(id);
    }

    @Override
    public List<Question> sosuo(String title) {
        return questionMapper.sosuo(title);
    }
}
